package com.wang.bootbuilder.service;

import com.wang.bootbuilder.entity.pojo.CrmBanner;
import com.wang.bootbuilder.mapper.CrmBannerMapper;
import com.wang.bootbuilder.tools.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CrmBannerService {

    @Autowired
    CrmBannerMapper crmBannerMapper;

    /*
    查询所有的banner
     */
    @Cacheable(key="'selectIndexList'", value="banner")
    public List<CrmBanner> selectAllBanner() {
        List<CrmBanner> bannerList = crmBannerMapper.selectList(null);
        return bannerList;
    }
}
